<?php
if (isset($post) && !empty($post)) :
?>
<?php
    $comments = $post->comments;
?>
<div class="post" style="border-bottom: none;">
    <h2 class="title">
        <?php echo $post->title; ?>
    </h2>
    <div class="meta">
        <span class="date"><?php echo $post->created_at->format('Y-m-d H:i:s'); ?></span>
        <span class="posted">Posted by <a href="#"><?php echo $post->profile->user->login; ?></a></span>
    </div>
    <div style="clear: both;">&nbsp;</div>
    <p class="entry">
        <?php echo $post->html_content; ?>
    </p>
</div>

<div id="comments">
    <?php if (count($comments)>0): ?>
    <?php
    foreach ($comments as $comment) {
        echo $comment->content;
    }
    ?>
    <?php else: ?>
    <p>No comments</p>
    <?php endif; ?>
</div>

<?php
else :
?>
<div class="ml-blog-info">
<?php echo MTranslator::translate('mandrill.blog.posts.empty', array(), 'ml-blog', 'modules') ?>
</div>
<?php
endif;
?>
